import { RouteRecordRaw } from "vue-router"

const Layout = () => import("@/layouts/index.vue")

export default [
  // 企业信息
  {
    path: "/company-info",
    component: Layout,
    redirect: "/company-info",
    meta: {
      hidden: true,
      roles: ["company"]
    },
    children: [
      {
        path: "",
        component: () => import("@/views/company-info/index.vue"),
        name: "companyInfo",
        meta: {
          title: "企业信息",
          roles: ["company"]
        }
      }
    ]
  },
  {
    // 岗位管理
    path: "/post-manage",
    component: Layout,
    redirect: "/post-manage",
    meta: {
      roles: ["company"]
    },
    children: [
      {
        path: "",
        component: () => import("@/views/post-manage/index.vue"),
        name: "postManage",
        meta: {
          title: "岗位管理",
          svgIcon: "post-manage",
          roles: ["company"]
        }
      }
    ]
  },
  {
    // 岗位详情
    path: "/post-details/:id",
    component: Layout,
    meta: {
      roles: ["company"],
      hidden: true
    },
    children: [
      {
        path: "",
        component: () => import("@/views/post-details/id.vue"),
        name: "postDetails",
        props: true,
        meta: {
          title: "岗位详情",
          hidden: true,
          roles: ["company"]
        }
      }
    ]
  },
  {
    // 招聘管理
    path: "/recruitment-manage",
    component: Layout,
    redirect: "/recruitment-manage",
    meta: {
      roles: ["company"]
    },
    children: [
      {
        path: "",
        component: () => import("@/views/recruitment-manage/index.vue"),
        name: "recruitmentManage",
        meta: {
          title: "招聘管理",
          svgIcon: "recruitment-manage",
          roles: ["company"]
        }
      }
    ]
  }
] as RouteRecordRaw[]
